package com.zr.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.zr.mapper.OrdersMapper;
import com.zr.pojo.Orders;
import com.zr.service.OrdersService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class OrdersServiceImpl implements OrdersService {

    @Resource
    private OrdersMapper mapper;

    @Override
    public PageInfo<Orders> selectByPage(String uid,Integer pageNum, Integer pageSize) {
        PageHelper.startPage(pageNum,pageSize);
        List<Orders> orderList = mapper.findAllOrderByUid("3");
        //设置连续显示的页码数量为3
        return new PageInfo<>(orderList,3);
    }

}
